import React from 'react'
import style from '../../chepiao/index.module.css'
import { useNavigate } from 'react-router-dom';
function Item(props) {
    console.log(props)
    const nav=useNavigate()
  return (
    <div>
      <div
        className={style.op}
        onClick={() =>
          nav(
            `/xiangqing/${props.id}?start=${props.startStation}&end=${props.endStation}`
          )
        }
      >
        <span>{props.startTime}</span>
        <span>{props.startStation}</span>
        <span>{props.trainNo}</span>
        <span>{props.fsoftSeat.price}</span>

        <span>{props.endStation}</span>
        <span>{props.endTime}</span>
        <span>{props.fsoftSeat.ticketNum}</span>
        <span>耗时:{props.timeTaken}</span>
      </div>
      <div>
        <span className={style.pp}>
          11月3日08:00起售，可预约抢票，开售自动抢
        </span>
      </div>
    </div>
  );
}

export default Item
